package com.maochang.controller;

import com.maochang.pojo.PsFunction;
import com.maochang.service.MenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 主菜单
 */
@Slf4j
@RestController
@RequestMapping("/Menu")
public class Menu {

    @Resource
    private MenuService Menservicelmpl;

   @GetMapping("/index")
    public List<PsFunction> index(Model model){
       List<PsFunction> CaiDanList=Menservicelmpl.seCaiDan();
       return CaiDanList;
    }

}
